package com.alibaba.dubbo.consumer;


import com.alibaba.dubbo.config.ReferenceConfig;
import com.alibaba.dubbo.demo.DemoService;
import com.alibaba.dubbo.rpc.service.GenericService;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.util.HashMap;
import java.util.Map;

public class MVCConsumer {
    public static void main(String[] args) {
        //测试常规服务
        ClassPathXmlApplicationContext context =
                new ClassPathXmlApplicationContext("consumer.xml");
        context.start();
        System.out.println("consumer start");
        DemoService demoService = context.getBean(DemoService.class);
        System.out.println("consumer");
        System.out.println(demoService.getPermissions(1L));


        GenericService myService = (GenericService) context.getBean("genService");
        Object result = myService.$invoke("sayHello", new String[] { "java.lang.String" }, new Object[] { "World" });

        int a;
        a = 0;

    }
}
